package com.ruoyi.system.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 内容对象 rc_template
 *
 * @author ruoyi
 * @date 2023-07-27
 */
public class RcTemplate extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long id;

    /** 分类 */
    @Excel(name = "分类")
    private String cate;

    /** 编码 */
    @Excel(name = "编码")
    private String keyword;

    /** 备注 */
    @Excel(name = "备注")
    private String content;

    /** 图片 */
    @Excel(name = "图片")
    private String pic;

    /** 排序 */
    @Excel(name = "排序")
    private String index;

    /** 删除标示 */
    @Excel(name = "删除标示")
    private Integer del;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }
    public void setCate(String cate)
    {
        this.cate = cate;
    }

    public String getCate()
    {
        return cate;
    }
    public void setKeyword(String keyword)
    {
        this.keyword = keyword;
    }

    public String getKeyword()
    {
        return keyword;
    }
    public void setContent(String content)
    {
        this.content = content;
    }

    public String getContent()
    {
        return content;
    }
    public void setPic(String pic)
    {
        if(pic == null){
            this.pic = "";
        }else{
            this.pic = pic.replaceAll(".*?167\\.4", "");
        }
    }

    public String getPic()
    {
        return pic;
    }
    public void setIndex(String index)
    {
        this.index = index;
    }

    public String getIndex()
    {
        return index;
    }
    public void setDel(Integer del)
    {
        this.del = del;
    }

    public Integer getDel()
    {
        return del;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("cate", getCate())
                .append("keyword", getKeyword())
                .append("content", getContent())
                .append("pic", getPic())
                .append("index", getIndex())
                .append("del", getDel())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .toString();
    }
}
